﻿@{
    ViewBag.Title = "ViewByType";
    ViewBag.Location = "Home";
    ViewBag.Empty = "1";
    IList<HandmadeShop.Application.Models.DisplayProductModel> list = ViewBag.Products;

    if (list.Count > 0)
    {
        ViewBag.Empty = "0";
    }
}

@if(ViewBag.Empty == "0") {
   
    <section class="content-wrapper main-content clear-fix">

        <div class="group group-card">            
            
            <div class="grid clear-fix">
            @{
                foreach (var item in list)
	            {
                    <div class="item">
                        <a href="#">     
                            <div class="image">
                                <img src="" alt="@item.Image1"/>
                            </div>           
                            <div class="item-group-1 clear-fix">
                                <span class="price">@item.Price đ</span>
                            </div>
                            <div class="item-group-2 clear-fix">
                                <span class="name">@item.Name</span>
                            </div>                
                        </a>
                    </div>
                }
            }
                
            </div>
        </div>
    </section>
} else {
    <section class="content-wrapper main-content clear-fix">
        <div class="content-empty">
            <span>Dữ liệu hiện tại trống. <a href="/Product/Create">Nhập</a> sản phẩm</span>
        </div>
    </section>
}
